extends ./index.jade

block content
	.rightSide
		.container-fluid
			.row
				form#goodsForm.form.form-inline
					.form-group
						label(for="school") 学校
						select#querySchool.form-control(name="schools")
					.form-group
						label.marginLeft(for="canteens") 食堂
						select#canteens.form-control(name="canteens")

					.form-group
						label.marginLeft 日期
						input#goodsdateStart.datepicker.date.form_datetime.controls.goods_date.widthFixed(type='text' placeholder='请选择开始时间' required)
						input#timeStart.datepicker.date.form_datetime.controls.goods_time.widthFixed(type='text' placeholder='请选择开始时间' required)
						labe 至
						input#goodsdateEnd.datepicker.date.form_datetime.controls.goods_date.widthFixed(type='text' placeholder='请选择结束时间' required)
						input#timeEnd.datepicker.date.form_datetime.controls.goods_time.widthFixed(type='text' placeholder='请选择结束时间' required)
					.form-group
						button#queryGoods.btn.btn-primary.marginLeft(type='submit') 查询
					.form-group
						#tips.text-danger
			.row#goodsInfo
				.row
					table#tableGoods.table.table-bordered.table-condensed.table-hover.center
						thead
							tr
								th 商品
								th 名称
								th 价格
								th 销量
						tbody#goods
				.row.text-right.forcedVerticalCenter
					span 
						|共
						span#total
						|条记录
					#paginator.paginator
					

	link(rel='stylesheet' href='/css/lib/bootstrap-datetimepicker.css')
	link(rel='stylesheet' href='/css/lib/select2.min.css')
	script#template_school(type='text/dot-tpl')
		|{{~it:value:index}}
		option(value='{{=value.id}}') {{=value.name}}
		|{{~}}
	script#template_canteen(type='text/dot-tpl')
		|{{~it:value:index}}
		option(value='{{=value.id}}') {{=value.name}}
		|{{~}}
	script#template_goods(type="text/dot-tpl")
		|{{~it:value:index}}
		tr
			td
				img(src='{{=value.item_pic_path}}' alt='商品图片' style='width:140px;height:80px;')
			td {{=value.item_name}}
			td {{=value.item_price}}
			td {{=value.item_sales}}
		|{{~}}
	script(src='/js/lib/require.js' data-main='/js/goods_query')

